package a.f.h.b;

public class k
{
  public static final k a = new k(0);
  public static final k b = new k(1);
  public static final k c = new k(2);
  public static final k d = new k(3);
  public static final k e = new k(1000);
  private static final String[] f = { "^", ">", "_", "<" };
  private static final char[] h = { '^', '>', '_', '<' };
  private int i;
  private static double j = 0.0001D;
  public static boolean k;
  
  k(int paramInt)
  {
    if (paramInt != 1000)
    {
      while (paramInt < 0) {
        paramInt += 4;
      }
      while (paramInt > 3) {
        paramInt -= 4;
      }
    }
    this.i = paramInt;
  }
  
  public static k a(double paramDouble)
  {
    int m = (int)Math.floor(paramDouble + j);
    return a(m);
  }
  
  public static k a(int paramInt)
  {
    int m = f.m;
    boolean bool = f.l;
    if (m == 0)
    {
      if (paramInt != 1000)
      {
        if (paramInt < 0) {}
        while (m != 0)
        {
          paramInt += 4;
          if (m != 0) {
            break label67;
          }
          if (bool) {
            break label62;
          }
          if (!bool) {
            break;
          }
        }
      }
      label62:
      while (m != 0) {
        if (paramInt > 3)
        {
          paramInt -= 4;
          if ((m == 0) && (bool)) {
            break label116;
          }
          if (!bool) {
            break;
          }
        }
      }
    }
    switch (paramInt)
    {
    case 0: 
      return a;
    case 1: 
      return b;
    case 2: 
      return c;
    case 3: 
      return d;
    case 1000: 
      label67:
      label116:
      return e;
    }
    throw new RuntimeException("Invalid number in direction construction: " + paramInt);
  }
  
  public static k a(char paramChar)
  {
    int n = f.m;
    boolean bool = f.l;
    int m = -1;
    if (n == 0) {}
    switch (paramChar)
    {
    case '^': 
      m = 0;
      if (n == 0) {
        if (!bool) {
          break;
        }
      }
      break;
    case '>': 
      m = 1;
      if (n == 0) {
        if (!bool) {
          break;
        }
      }
      break;
    case '_': 
      m = 2;
      if (n == 0) {
        if (!bool) {
          break;
        }
      }
      break;
    case '<': 
      m = 3;
      if (n == 0) {
        if (!bool) {
          break;
        }
      }
      break;
    case '+': 
      m = 1000;
      if (n == 0) {
        if (!bool) {
          break;
        }
      }
      break;
    default: 
      throw new RuntimeException("Direction Constructor: Invalid character: " + paramChar);
    }
    return a(m);
  }
  
  public k a()
  {
    int n = f.m;
    if (n == 0) {
      if (this == e) {
        return a(this.i);
      }
    }
    int m = this.i + 1;
    if (n == 0) {
      if (m > 3) {
        m = 0;
      }
    }
    return a(m);
  }
  
  public k b(int paramInt)
  {
    int n = f.m;
    boolean bool = f.l;
    if (n == 0) {
      if (this == e) {
        return a(this.i);
      }
    }
    k localk = this;
    do
    {
      for (int m = 0; !bool; m++)
      {
        if (m >= paramInt) {
          break;
        }
        if (bool) {
          break label63;
        }
        localk = localk.a();
      }
    } while (n != 0);
    label63:
    return localk;
  }
  
  public k b()
  {
    int n = f.m;
    if (n == 0) {
      if (this == e) {
        return a(this.i);
      }
    }
    int m = this.i - 1;
    if (n == 0) {
      if (m < 0) {
        m = 3;
      }
    }
    return a(m);
  }
  
  public k c(int paramInt)
  {
    int n = f.m;
    boolean bool = f.l;
    if (n == 0) {
      if (this == e) {
        return a(this.i);
      }
    }
    k localk = this;
    do
    {
      for (int m = 0; !bool; m++)
      {
        if (m >= paramInt) {
          break;
        }
        if (bool) {
          break label63;
        }
        localk = localk.b();
      }
    } while (n != 0);
    label63:
    return localk;
  }
  
  public k d()
  {
    int n = f.m;
    if (n == 0) {
      if (this == e) {
        return e;
      }
    }
    int m = this.i + 2;
    if (n == 0) {
      if (m > 3) {
        m -= 4;
      }
    }
    return a(m);
  }
  
  public boolean e()
  {
    int n = f.m;
    int m = g();
    if (n == 0) {
      if (m != 1) {
        if (n != 0) {
          break label28;
        }
      }
    }
    label28:
    return m == 3;
  }
  
  public boolean f()
  {
    int n = f.m;
    int m = g();
    if (n == 0) {
      if (m != 0) {
        if (n != 0) {
          break label27;
        }
      }
    }
    label27:
    return m == 2;
  }
  
  public boolean a(k paramk)
  {
    int n = f.m;
    int m = this.i + paramk.i;
    if ((n != 0) || (m < 1000)) {
      if (n != 0) {}
    }
    return m % 2 == 0;
  }
  
  public boolean c(k paramk)
  {
    int m = f.m;
    if (m == 0)
    {
      if (this != e) {
        if (m != 0) {
          break label29;
        }
      }
    }
    else {
      if (paramk != e) {
        break label28;
      }
    }
    return false;
    label28:
    label29:
    if (m == 0) {}
    return this.i == paramk.g();
  }
  
  public int g()
  {
    return this.i;
  }
  
  public int h()
  {
    return this.i;
  }
  
  public char i()
  {
    if (this == e) {
      return '+';
    }
    return h[this.i];
  }
  
  public String toString()
  {
    if (this == e) {
      return "+";
    }
    return f[this.i];
  }
  
  int e(k paramk)
  {
    int n = f.m;
    int m = paramk.i - this.i;
    if (n == 0)
    {
      if (m != 4)
      {
        if (n != 0) {
          break label44;
        }
        if (m != 0) {}
      }
      else
      {
        m = 2;
      }
    }
    else
    {
      if (n != 0) {
        break label55;
      }
      if (!f.l) {
        return m;
      }
    }
    label44:
    if (n == 0) {
      if (m < 0) {
        m += 4;
      }
    }
    label55:
    return m;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.h.b.k
 * JD-Core Version:    0.7.0.1
 */